<%--
  Created by IntelliJ IDEA.
  User: dailyblue
  Date: 2023/4/9
  Time: 14:05
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<c:if test="${not empty cookie.get('USER')}">
    <%--cookie中有值不需要登陆，直接跳转--%>
    <c:redirect url="main.jsp"/>
</c:if>
<form action="../cookie" method="post">
    <input type="hidden" name="type" value="login"/>
    账号：<input type="text" name="name"/><br/>
    密码：<input type="password" name="password"/><br/>
    <button>登陆</button>
</form>
</body>
</html>
